{% include "pg/head.html" with context %}
    <div class="container">
        <div class="row">
            <a href="/pg"> <img class="img-responsive center-block" src="/tpl/pg/img/logobrain.png"></a>
        </div>
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                <div class="login-panel panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Accesso Collect BrainODM</h3>
                    </div>
                    <div class="panel-body">
                        <form id="ae_form" action="/pg/login" method="POST" role="form">
                            <fieldset>
                                <div class="form-group">
                                    <select  id="id_ente" name="id_ente">
                                            <option value=""></option>
                                        {% for t in pageData['enti'] %}
                                            <option value="{{t.id}}">{{t.denominazione}}</option>
                                        {% endfor %}
                                    </select>
                                </div>
                                <div class="form-group">
                                    <input class="form-control validate[required]" placeholder="Username" name="username" type="username" autofocus>
                                </div>
                                <div class="form-group">
                                    <input class="form-control validate[required]"  placeholder="Password" name="password" type="password" value="">
                                </div>
                                <div class="checkbox">
                                    <label>
<!--
                                        <input name="remember" type="checkbox" value="Remember Me">Remember Me
-->
                                    </label>
                                </div>
                                <!-- Change this to a button or input when using this as a form -->
                                <button type="submit" class="btn btn-lg btn-success btn-block">Accedi</button>
                            </fieldset>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script src="/tpl/pg/js/jquery-1.10.2.js"></script>
<script src="/tpl/pg/bootstrap/js/bootstrap.min.js"></script>
<script src="/tpl/pg/js/plugins/jQuery-Validation-Engine/js/languages/jquery.validationEngine-en.js"></script>
<script src="/tpl/pg/js/plugins/jQuery-Validation-Engine/js/jquery.validationEngine.js"></script>
<script src="/tpl/pg/js/plugins/select2-3.4.6/select2.min.js"></script>
<script type="text/javascript">

$(document).ready(function(){
  $("#id_ente").select2({width:"100%",placeholder:"Seleziona l'ente"});
 $("#ae_form").validationEngine();
});
</script>
